import pandas as pd
import numpy as np

# 创建3个dataFrame
df1 = pd.DataFrame(np.random.randn(6, 4),
                   index=['a', 'b', 'c', 'd', 'e', 'f'],
                   columns=['one', 'two', 'three', 'four'])
df2 = pd.DataFrame(np.random.randn(6, 4),
                   index=['a', 'b', 'c', 'd', 'e', 'f'],
                   columns=['one', 'two', 'three', 'four'])
df3 = pd.DataFrame(np.random.randn(6, 4),
                   index=['a', 'b', 'c', 'd', 'e', 'f'],
                   columns=['one', 'two', 'three', 'four'])

# 打印
print(df1)
print(df2)
print(df3)

# 上下合并
print(pd.concat([df1, df2, df3],axis=0,ignore_index=True))
print(df1.append(df2).append(df3))

# 左右合并
print(pd.concat([df1, df2, df3],axis=1,join='inner'))